from django.db import models
# Create your models here.
# 创建数据库表结构
from django.contrib.auth.models import AbstractUser

class Book(models.Model):
	id = models.AutoField(primary_key = True)
	title = models.CharField(max_length=32)
	pub_date = models.DateField()
	price = models.DecimalField(max_digits=8,decimal_places=2)
	publish = models.CharField(max_length=32)


	def __str__(self):
		return self.title
class User(AbstractUser):
	first_name = models.CharField(max_length=32)
	second_name = models.CharField(max_length=32)
	email = models.CharField(max_length=32)
	title = models.CharField(max_length=32)



